//- Copyright (C) 2023 Beijing Huaxia Chunsong Technology Co., Ltd. 
//- <https://www.chatopera.com>, Licensed under the Chunsong Public 
//- License, Version 1.0  (the "License"), https://docs.cskefu.com/licenses/v1.html
//- Unless required by applicable law or agreed to in writing, software
//- distributed under the License is distributed on an "AS IS" BASIS,
//- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//- See the License for the specific language governing permissions and
//- limitations under the License.
//- Copyright (C) 2018-Jun. 2023 Chatopera Inc, <https://www.chatopera.com>
//- Licensed under the Apache License, Version 2.0
//- http://www.apache.org/licenses/LICENSE-2.0
doctype html
html
    head
        meta(charset='utf-8')
        meta(http-equiv='X-UA-Compatible', content='IE=edge')
        meta(http-equiv='Cache-Control', content='no-siteapp')
        meta(name='viewport', content='width=device-width,maximum-scale=1,initial-scale=1,initial-scale=1,user-scalable=no')
        meta(name='apple-mobile-web-app-capable', content='yes')
        title 在线咨询
        link(rel='shortcut icon', type='image/x-icon', href='/images/favicon.ico?t=1489039620156')
        link(rel='stylesheet', type='text/css', href='/im/css/ukefu.css')
        link#skin(rel='stylesheet', type='text/css', href='/im/css/default/ukefu.css')
        //- telemetry
        include telemetry
    body(class={'ukefu-point-text': type == 'text'},style='overflow:hidden;')
        form(action='/im/leavemsg/save.html?appid=' + appid, method='post')
            if skill
                input(type="hidden", name="skillId", value=skill)
            .large.ukefu-im-theme(class="ukefu-theme-border-" + (type = 'text' ? inviteData.consult_dialog_color : ''))
                #containter.clearfix
                    - var dialog_logo=inviteData.consult_dialog_logo?'/res/image.html?id='+inviteData.consult_dialog_logo:'/images/logo.png'
                    #header(class='theme' + inviteData.consult_dialog_color)
                        img(src=dialog_logo, style='height:30px;padding:10px;')
                    .ukef-leavemsg-tip(style='padding-left: 15px')
                        if inviteData.leavemessage
                            if sessionConfig.hourcheck
                                if isInWorkingHours
                                    | #{sessionConfig.noagentmsg}
                                else
                                    | #{sessionConfig.notinwhmsg}
                            else
                                | #{sessionConfig.noagentmsg}
                    .leaveCon
                        form
                            if inviteData.lvmname
                                p
                                    span
                                        | 您的姓名：
                                        b *
                                    input(type="text", name="name", class="txt01 txt02", required="required", maxlength="50")
                            if inviteData.lvmphone
                                p
                                    span
                                        | 您的电话：
                                        b *
                                    input(type="text", class="txt01 txt02", name="mobile", required="required", maxlength="30")
                            if inviteData.lvmemail
                                p
                                    span 您的邮箱：
                                    input(type="text", class="txt01 txt02", name="email", maxlength="100")
                            if inviteData.lvmaddress
                                p
                                    span 您的地址：
                                    input(type="text", class="txt01 txt02", name="address", maxlength="50")
                            if inviteData.lvmqq
                                p
                                    span 您的QQ：
                                    input(type="text", class="txt01 txt02", name="qq", maxlength="30")
                            p
                                span 留言内容：
                                textarea(class="txt01 txt03", style="position: relative; overflow: hidden;", name="content", maxlength="240")
                            p(class="submitBtnWrap")
                                input(type="submit", class="btn submitBtn theme" + inviteData.consult_dialog_color, value="提 交")
        style.
            .leaveCon {
                width: 100%;
                max-width: 550px;
                padding: 0 15px;
            }

            .leaveCon .txt01 {
                width: calc(100% - 130px);
            }
